package com.sample.application.context;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.sample.api.CassandraDao;
import com.sample.api.Dao;
import com.sample.api.WebApi;

@Configuration
public class ApplicationConfig {

	@Autowired
	@Bean
	public WebApi webApi(Dao dao) {
		return new WebApi(dao);
    }
	
	@Bean
	public Dao dao() {
		return new CassandraDao();
	}
}
